package testmysql.mysql;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.nutz.dao.entity.annotation.ColDefine;
import org.nutz.dao.entity.annotation.ColType;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.json.Json;
import org.nutz.lang.Times;
import org.nutz.lang.random.R;

@SuppressWarnings("all")
@Table("t_log")
public class t_log {

	@Name
	@ColDefine(width = 32)
	private String id_;

	@ColDefine(width = 50)
	private String key_;
	@ColDefine(width = 100)
	private String val_;

	@ColDefine(type = ColType.DATETIME)
	private Date date_;

	public String getId_() {
		return id_;
	}

	public void setId_(String id_) {
		this.id_ = id_;
	}

	public String getKey_() {
		return key_;
	}

	public void setKey_(String key_) {
		this.key_ = key_;
	}

	public String getVal_() {
		return val_;
	}

	public void setVal_(String val_) {
		this.val_ = val_;
	}

	public Date getDate_() {
		return date_;
	}

	public void setDate_(Date date_) {
		this.date_ = date_;
	}

	public static t_log me() {
		t_log log = new t_log();
		log.setId_(R.UU16());
		log.setKey_("zhang" + Times.ms());
		log.setVal_(String.valueOf(Times.ms()));
		log.setDate_(Times.now());
		return log;
	}

	/**
	 * 10000条
	 * 
	 * @return
	 */
	public static List<t_log> me_1w() {
		List out = new ArrayList();
		for (int i = 0; i < 10000; i++) {
			out.add(me());
		}
		return out;
	}

	/**
	 * 1000条
	 * 
	 * @return
	 */
	public static List<t_log> me_1k() {
		List out = new ArrayList();
		for (int i = 0; i < 1000; i++) {
			out.add(me());
		}
		return out;
	}

 

}
